<template>
  <div>
    <el-button @click="setNum(1)">+</el-button>
    <input :value="num" readonly type="text">
    <el-button @click="setNum(-1)">-</el-button>
  </div>
</template>
<script>
export default {
  props: ['num'],
  methods: {
    setNum(step) {
      this.$emit('update:num', this.num + step)
    }
  }
}
</script>
<style></style>
